import request from '@/api/request'

// 添加限时活动
 function addRecommend(data) {
  return request({
    url: '/lejuAdmin/homeRecommend/addRecommend',
    method: 'POST',
    data
  })
}
// 删除限时活动
function delRecommend(recommendId,data) {
    return request({
      url: `/lejuAdmin/homeRecommend/delRecommend/${recommendId}`,
      method: 'DELETE',
      data
    })
  }
//活动列表
function findAllRecommends(data) {
    return request({
      url: '/lejuAdmin/homeRecommend/findAllRecommends',
      method:'GET',
      data
    })
  }
 // 修改限时活动
 function updateRecommend(data) {
    return request({
      url: '/lejuAdmin/homeRecommend/updateRecommend',
      method: 'POST',
      data
    })
  }
  //活动明细
function recommend(recommendId,data) {
    return request({
      url:`/lejuAdmin/homeRecommend/${recommendId}`,
      method:'GET',
      data
    })
  }
export default{
    addRecommend,delRecommend,findAllRecommends,updateRecommend,recommend
}
